package com.carl.model;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("cy_fruit")
public class Fruit extends Model<Fruit> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 用户名
     */
	private String name;
    /**
     * 最佳年龄
     */
	private Integer bestAge;
    /**
     * 产地
     */
	private String place;


	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Fruit{" + "id=" + id + ", name='" + name + '\'' +
				", bestAge=" + bestAge + ", place='" + place + '\'' + '}';
	}
}
